<!--
 * @Autor: zengy
 * @Date: 2021-03-11 17:00:56
 * @LastEditors: zengy
 * @LastEditTime: 2021-09-04 11:06:46
 * @Description: 
 * @FilePath: \Mics3.0_3DViewer_WEB\3DViewer\src\App.vue
-->
<template>
  <el-config-provider :locale="locale">
    <router-view></router-view>
  </el-config-provider>
</template>
<script>
import { ElConfigProvider } from 'element-plus';
import zhCn from 'element-plus/lib/locale/lang/zh-cn';
if(!window.CefSharp)document.querySelector('#app').classList.add('dev');
// ht路径配置
window.htconfig = {
  Default: {
    /**
     * 请求json路径配置
     * */
    convertURL(url) {
      let storagePrefix = process.env.NODE_ENV === 'production' ? './ht' : './static/ht';
      if (
        storagePrefix &&
        url &&
        !/^data:image/.test(url) &&
        !/^http/.test(url) &&
        !/^https/.test(url)
      ) {
        url = storagePrefix + '/' + url;
      }
      url += (url.indexOf('?') >= 0 ? '&' : '?') + 'ts=' + Date.now();
      let match = window.location.href.match('sid=([0-9a-z-]*)');
      if (match) {
        window.sid = match[1];
      }
      if (window.sid) {
        url += '&sid=' + window.sid;
      }
      return url;
    },
    zoomIncrement: 1.3,
    scrollZoomIncrement: 1.3, // 鼠标滚轮缩放步进
    // pinchZoomIncrement : 1.02,  //触屏双指缩放步进
    zoomMin: 0.44,
    zoomMax: 8
  }
};
export default {
  name: 'app',
  components: {
    [ElConfigProvider.name]: ElConfigProvider
  },
  setup() {
    let locale = zhCn;
    return {
      locale
    };
  }
};
</script>
<style lang="less">
#app.dev {
  background-color: #030d20;
}
</style>
